	$(function() {
		f_initGrid(contextPath + "/DdglAction?control=getDdList", null);
		});
	var manager, g;
	function f_initGrid(dataUrl, postParams)
	{ 
		g = manager = $("#maingrid").ligerGrid({
			columns: [
			{ display: '订单号',  name: 'ddh',editor: { type: 'text' }},
			{ display: '客户姓名',  name: 'khxm',editor: { type: 'text' }},
			{ display: '客户电话', name: 'khdh',editor: { type: 'text' }},
			{ display: '销售人',  name: 'xsr',editor: { type: 'text' }},
			{ display: '订单总价',  name: 'ddzj',editor: { type: 'text' }},
			{ display: '订单时间',  name: 'ddsj',editor: { type: 'text' },render:function(value){
				return formatDate(value.ddsj,"yyyy-MM-dd");
			}}
			],
			enabledEdit: false, height: '95%', checkbox:true,rownumbers:true,
			parms:postParams,
			url :dataUrl,
			width: '100%'
		});   
	}
	function getSelected()
	{ 
		var row = manager.getSelectedRow();
		if (!row) { 
			alert('请选择行');
			return; 
		}
		
		return row;
	}
	function getData()
	{ 
		return manager.getData();
	} 